//
//  ZZQLiveCell.m
//  zzqKanBoKe
//
//  Created by ben on 17/2/10.
//  Copyright © 2017年 张增强. All rights reserved.
//

#import "ZZQLiveCell.h"

@interface ZZQLiveCell()

@property (weak, nonatomic) IBOutlet UIImageView *headView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *locationLabel;
@property (weak, nonatomic) IBOutlet UILabel *onLineLabel;
@property (weak, nonatomic) IBOutlet UIImageView *bigImageView;


@end

@implementation ZZQLiveCell

- (void)setLive:(ZZQLive *)live{
    _live = live;
    
    [self.headView downloadImage: live.creator.portrait placeholder:@"default_room"];
    [self.bigImageView downloadImage: live.creator.portrait placeholder:@"default_room"];
    self.nameLabel.text = live.creator.nick;
    self.locationLabel.text = live.city;
    self.onLineLabel.text = [@(live.onlineUsers) stringValue];
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.headView.layer.cornerRadius = 25;
    self.headView.clipsToBounds = YES;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
